package com.ruoyi.his.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.his.mapper.ReAreaMapper;
import com.ruoyi.his.domain.ReArea;
import com.ruoyi.his.service.IReAreaService;

/**
 * 区Service业务层处理
 *
 * @author Alan
 * @date 2024-03-09
 */
@Service
public class ReAreaServiceImpl implements IReAreaService
{
    @Autowired
    private ReAreaMapper reAreaMapper;

    /**
     * 查询区
     *
     * @param code 区主键
     * @return 区
     */
    @Override
    public ReArea selectReAreaByCode(String code)
    {
        return reAreaMapper.selectReAreaByCode(code);
    }

    /**
     * 查询区列表
     *
     * @param reArea 区
     * @return 区
     */
    @Override
    public List<ReArea> selectReAreaList(ReArea reArea)
    {
        return reAreaMapper.selectReAreaList(reArea);
    }

    /**
     * 新增区
     *
     * @param reArea 区
     * @return 结果
     */
    @Override
    public int insertReArea(ReArea reArea)
    {
        return reAreaMapper.insertReArea(reArea);
    }

    /**
     * 修改区
     *
     * @param reArea 区
     * @return 结果
     */
    @Override
    public int updateReArea(ReArea reArea)
    {
        return reAreaMapper.updateReArea(reArea);
    }

    /**
     * 批量删除区
     *
     * @param codes 需要删除的区主键
     * @return 结果
     */
    @Override
    public int deleteReAreaByCodes(String[] codes)
    {
        return reAreaMapper.deleteReAreaByCodes(codes);
    }

    /**
     * 删除区信息
     *
     * @param code 区主键
     * @return 结果
     */
    @Override
    public int deleteReAreaByCode(String code)
    {
        return reAreaMapper.deleteReAreaByCode(code);
    }
}
